package com.feng.demo.jakartacommons.mina.codec;

import org.apache.mina.filter.codec.demux.DemuxingProtocolCodecFactory;
import org.apache.mina.filter.codec.demux.MessageDecoder;
import org.apache.mina.filter.codec.demux.MessageEncoder;


public class InfoMessageCodecFactory  extends DemuxingProtocolCodecFactory{  
    private MessageDecoder decoder;  
    private MessageEncoder<InfoXml> encoder;  
      
    public InfoMessageCodecFactory(MessageDecoder decoder,MessageEncoder<InfoXml> encoder){  
        this.decoder = decoder;  
        this.encoder = encoder;  
        addMessageDecoder(this.decoder);  
        addMessageEncoder(InfoXml.class, this.encoder);  
    }  
}
